namespace Agro.Models {
        using System;
        using SN.Data;
        
        
        /// <summary>
        /// 表名：T_User_Permission 主键列：UP_UserID,UP_Type,UP_TableID
        /// </summary>
        [SerializableAttribute()]
        public partial class T_User_Permission : Entity {
            
            protected Int32 _UP_UserID;
            
            protected String _UP_Type;
            
            protected String _UP_TableID;
            
            protected String _UP_IsLook;
            
            protected String _UP_CreateUserID;
            
            protected String _UP_CreateDate;
            
            protected String _UP_CreateIP;
            
            /// <summary>
            /// 用户表ID
            /// </summary>
            public Int32 UP_UserID {
                get {
                    return this._UP_UserID;
                }
                set {
                    this.OnPropertyValueChange(_.UP_UserID, _UP_UserID, value);
                    this._UP_UserID = value;
                }
            }
            
            /// <summary>
            /// 权限类型
            /// </summary>
            public String UP_Type {
                get {
                    return this._UP_Type;
                }
                set {
                    this.OnPropertyValueChange(_.UP_Type, _UP_Type, value);
                    this._UP_Type = value;
                }
            }
            
            /// <summary>
            /// 权限表中的ID
            /// </summary>
            public String UP_TableID {
                get {
                    return this._UP_TableID;
                }
                set {
                    this.OnPropertyValueChange(_.UP_TableID, _UP_TableID, value);
                    this._UP_TableID = value;
                }
            }
            
            /// <summary>
            /// 是否查询
            /// </summary>
            public String UP_IsLook {
                get {
                    return this._UP_IsLook;
                }
                set {
                    this.OnPropertyValueChange(_.UP_IsLook, _UP_IsLook, value);
                    this._UP_IsLook = value;
                }
            }
            
            /// <summary>
            /// 创建人员
            /// </summary>
            public String UP_CreateUserID {
                get {
                    return this._UP_CreateUserID;
                }
                set {
                    this.OnPropertyValueChange(_.UP_CreateUserID, _UP_CreateUserID, value);
                    this._UP_CreateUserID = value;
                }
            }
            
            /// <summary>
            /// 创建时间
            /// </summary>
            public String UP_CreateDate {
                get {
                    return this._UP_CreateDate;
                }
                set {
                    this.OnPropertyValueChange(_.UP_CreateDate, _UP_CreateDate, value);
                    this._UP_CreateDate = value;
                }
            }
            
            /// <summary>
            /// 创建IP
            /// </summary>
            public String UP_CreateIP {
                get {
                    return this._UP_CreateIP;
                }
                set {
                    this.OnPropertyValueChange(_.UP_CreateIP, _UP_CreateIP, value);
                    this._UP_CreateIP = value;
                }
            }
            
            /// <summary>
            /// 获取实体对应的表名
            /// </summary>
            protected override Table GetTable() {
                return new Table<T_User_Permission>("T_User_Permission");
            }
            
            /// <summary>
            /// 获取实体中的主键列
            /// </summary>
            protected override Field[] GetPrimaryKeyFields() {
                return new Field[] {
                        _.UP_UserID,
                        _.UP_Type,
                        _.UP_TableID};
            }
            
            /// <summary>
            /// 获取列信息
            /// </summary>
            protected override Field[] GetFields() {
                return new Field[] {
                        _.UP_UserID,
                        _.UP_Type,
                        _.UP_TableID,
                        _.UP_IsLook,
                        _.UP_CreateUserID,
                        _.UP_CreateDate,
                        _.UP_CreateIP};
            }
            
            /// <summary>
            /// 获取列数据
            /// </summary>
            protected override object[] GetValues() {
                return new object[] {
                        this._UP_UserID,
                        this._UP_Type,
                        this._UP_TableID,
                        this._UP_IsLook,
                        this._UP_CreateUserID,
                        this._UP_CreateDate,
                        this._UP_CreateIP};
            }
            
            /// <summary>
            /// 给当前实体赋值
            /// </summary>
            protected override void SetValues(IRowReader reader) {
                if ((false == reader.IsDBNull(_.UP_UserID))) {
                    this._UP_UserID = reader.GetInt32(_.UP_UserID);
                }
                if ((false == reader.IsDBNull(_.UP_Type))) {
                    this._UP_Type = reader.GetString(_.UP_Type);
                }
                if ((false == reader.IsDBNull(_.UP_TableID))) {
                    this._UP_TableID = reader.GetString(_.UP_TableID);
                }
                if ((false == reader.IsDBNull(_.UP_IsLook))) {
                    this._UP_IsLook = reader.GetString(_.UP_IsLook);
                }
                if ((false == reader.IsDBNull(_.UP_CreateUserID))) {
                    this._UP_CreateUserID = reader.GetString(_.UP_CreateUserID);
                }
                if ((false == reader.IsDBNull(_.UP_CreateDate))) {
                    this._UP_CreateDate = reader.GetString(_.UP_CreateDate);
                }
                if ((false == reader.IsDBNull(_.UP_CreateIP))) {
                    this._UP_CreateIP = reader.GetString(_.UP_CreateIP);
                }
            }
            
            public override int GetHashCode() {
                return base.GetHashCode();
            }
            
            public override bool Equals(object obj) {
                if ((obj == null)) {
                    return false;
                }
                if ((false == typeof(T_User_Permission).IsAssignableFrom(obj.GetType()))) {
                    return false;
                }
                if ((((object)(this)) == ((object)(obj)))) {
                    return true;
                }
                return false;
            }
            
            public class _ {
                
                /// <summary>
                /// 表示选择所有列，与*等同
                /// </summary>
                public static AllField All = new AllField<T_User_Permission>();
                
                /// <summary>
                /// 用户表ID - 字段名：UP_UserID - 数据类型：Int32
                /// </summary>
                public static Field UP_UserID = new Field<T_User_Permission>("UP_UserID");
                
                /// <summary>
                /// 权限类型 - 字段名：UP_Type - 数据类型：String
                /// </summary>
                public static Field UP_Type = new Field<T_User_Permission>("UP_Type");
                
                /// <summary>
                /// 权限表中的ID - 字段名：UP_TableID - 数据类型：String
                /// </summary>
                public static Field UP_TableID = new Field<T_User_Permission>("UP_TableID");
                
                /// <summary>
                /// 是否查询 - 字段名：UP_IsLook - 数据类型：String
                /// </summary>
                public static Field UP_IsLook = new Field<T_User_Permission>("UP_IsLook");
                
                /// <summary>
                /// 创建人员 - 字段名：UP_CreateUserID - 数据类型：String
                /// </summary>
                public static Field UP_CreateUserID = new Field<T_User_Permission>("UP_CreateUserID");
                
                /// <summary>
                /// 创建时间 - 字段名：UP_CreateDate - 数据类型：String
                /// </summary>
                public static Field UP_CreateDate = new Field<T_User_Permission>("UP_CreateDate");
                
                /// <summary>
                /// 创建IP - 字段名：UP_CreateIP - 数据类型：String
                /// </summary>
                public static Field UP_CreateIP = new Field<T_User_Permission>("UP_CreateIP");
            }
        }
    }
    